#ifndef EXECPLUGIN_H
#define EXECPLUGIN_H

#include <sys/time.h>
#include <pango/pangocairo.h>
#include "common.h"
#include "area.h"

typedef struct Execp {
	// always start with area
	Area area;
	int centered;
	int iconx;
	int icony;
	int textx;
	int texty;
	int textw;
	int texth;
	Color font;
} Execp;

extern PangoFontDescription *execp_font_desc;
extern int execp_enabled;
// command to execute
extern char *execp_command;
// first line is an icon?
extern int execp_has_icon;
extern int execp_cache_icon;
extern int execp_icon_w;
extern int execp_icon_h;
// interval in seconds
extern int execp_interval;
extern int execp_pipe[2];

// default global data
void default_execp();

// freed memory
void cleanup_execp();

// initialize: y position, ...
void init_execp();
void init_execp_panel(void *panel);

void draw_execp(void *obj, cairo_t *c);

int  resize_execp(void *obj);

void execp_action(int button);

#endif // EXECPLUGIN_H
